import request from '@/utils/request';

const prefix = '/apharbor'

// 根据 harbor 的类型获取不同的用户密码
export async function getPassword(harborType) {
  return request(`${prefix}/api/v1/harbor/getAccess`, {
    method: 'GET',
    params: {
      harborType
    },
  });
}
export async function getPublicHarborAccess() {
  return request(`${prefix}/api/v1/harbor/getPublicHarborAccess`, {
    method: 'GET'
  });
}

export async function getUserHarborAccess() {
  return request(`${prefix}/api/v1/harbor/getUserHarborAccess`, {
    method: 'GET'
  });
}

export async function getHarborAddress(harborType) {
  return request(`${prefix}/api/v1/harbor/getHarborAddress`, {
    method: 'GET',
    params: {
      harborType
    },
  });
}


export async function editHarborDesc(data) {
  return request(`${prefix}/api/v1/images/image/editDescription`, {
    method: 'POST',
    data:data
  });
}


export async function deletePublicHarbor(id) {
  return request(`${prefix}/api/v1/images/publicImage/${id}`, {
    method: 'DELETE',
  });
}

